package krakow.ae.knp.wikiboard.gui.tools.markers;

import krakow.ae.knp.wikiboard.gui.tools.*;

/*
 * Class that produces appropriate FigureMarkers
 */
public class FigureMarkerFactory {
    
    public static FigureMarker createObject( DrawingMode drawingMode ) {
        FigureMarker result = null;
        
        switch( drawingMode ) {
            case LINE:
                result = new LineMarker();
                break;
            case RECTANGLE:
                result = new RectMarker();
                break;
            case ELLIPSE:
                result = new EllipseMarker();
                break;
            case STRAIGHT_LINE:
                result = new StraightLineMarker();
                break;
            case TEXT:
                result = new TextMarker();
                break;    
            default:
                result = null;
                break;
        }
        return result;
    }
}
